#限制提示最大多少创建的地址
ADDRESS_MAX_COUNT = 4



# #手机短信
from ronglian_sms_sdk import SmsSDK
accId = '8aaf07087bc82708017bf7aae5000e27'   #8aaf07087bc82708017bf7aae5000e27
accToken = 'f53d9d4740ed40adb6829538dc940709' #f53d9d4740ed40adb6829538dc940709
appId = '8aaf07087bc82708017bf7aae5e00e2e'  #8aaf07087bc82708017bf7aae5e00e2e
import json
def send_message(mobile,code,time):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = mobile
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    result = json.loads(resp)
    if result['statusCode'] == '000000':
        return 1
    return 2



#redis 存储数据
def get_redis_conn():
    from django_redis import get_redis_connection
    conn = get_redis_connection()
    return conn